<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
		<link rel="stylesheet" href="__STATIC__/hdjs/hdjs.css" />
		<link rel="stylesheet" href="__STATIC__/css/bootstrap.css" />
		<script src="__STATIC__/js/jq.js"></script>
		<script src="__CONTROLLER_VIEW__/js/show.js"></script>
		<script>
			var CONTROLLER = '__CONTROLLER__';
		</script>
		<script type="text/javascript" src="__STATIC__/hdjs/hdjs.js"></script>
		<script>
			function showmodal(cid) {
				hd_modal({
					width: 400, //宽度
					height: 200, //高度
					title: '您确认删除吗?', //标题
					content: '', //提示信息
					button: true, //显示按钮
					button_success: "确定", //确定按钮文字
					button_cancel: "关闭", //关闭按钮文字
					timeout: 0, //自动关闭时间 0：不自动关闭
					shade: true, //背景遮罩
					shadeOpacity: 0.5, //背景透明度
					success: function() { //点击确定后的事件
						location.href = "__CONTROLLER__/delCate/cid/" + cid;
					},
					cancel: function() { //点击关闭后的事件
					}
				});
			}
		</script>
		<title>分类管理</title>
		<style type="text/css">
			.plus_minus {
				width: 20px;
			}
		</style>
	</head>

	<body>
		<div class="wrap">

			<div class="hd-title-header">
				分类列表
			</div>

			<table class="hd-table hd-table-list">
				<thead>

					<tr>
						<td width="30">展</td>
						<td>分类id</td>
						<td>分类名称</td>
						<td>分类标题</td>
						<td>分类排序</td>
						<td>静态目录</td>
						<td>列表静态</td>
						<td>内容静态</td>
						<td>是否显示</td>
						<td width="200">操作</td>
					</tr>
				</thead>
				<tbody>
					<foreach from="$cates" key="$k" value="$v">
						<tr>
							<td width="30">
								<a href="javascript:;" class="glyphicon glyphicon-plus show" data-cid="{$v.cid}"></a>
							</td>
							<td>{$v.cid}</td>
							<td class="cname">{$v.cname|hd_substr:10,'...'}</td>
							<td>{$v.ctitle|hd_substr:10,'...'}</td>
							<td>{$v.csort}</td>
							<td>{$v.htmldir}</td>
							<td>
								<if value="$v.is_listhtml eq 0">非静态
									<else/>静态</if>
							</td>
							<td>
								<if value="$v.is_archtml eq 0">非静态
									<else/>静态</if>
							</td>
							<td>
								<if value="$v.is_show eq 1">显示
									<else/>不显示</if>
							</td>
							<td width="200">
								<a href="__CONTROLLER__/addson/cid/{$v.cid}/cname/{$v.cname}" class="btn btn-primary btn-xs">添加子分类</a>
								<a href="__CONTROLLER__/editcate/cid/{$v.cid}" class="btn btn-success btn-xs">修改</a>
								<a href="javascript:showmodal({$v.cid});" class="btn btn-danger btn-xs">删除</a>
							</td>
						</tr>
					</foreach>
				</tbody>
			</table>
			<div class="page_hdjob">

			</div>
		</div>

	</body>

</html>